package com.sinotrans.common.entity;

import java.util.Collection;
import java.util.List;

import com.sinotrans.common.util.Utils;

public class AuthProperties {
	private List<AuthClientProperties> configs;

	public AuthClientProperties getAuthByName(String clientName) {
		for (AuthClientProperties auth : configs) {
			if (Utils.isEquals(auth.getClientName(), clientName)) {
				return auth;
			}
		}
		return null;
	}

	public AuthClientProperties getAuthById(String clientid) {
		for (AuthClientProperties auth : configs) {
			if (Utils.isEquals(auth.getClientId(), clientid)) {
				return auth;
			}
		}
		return null;
	}

	public Collection<AuthClientProperties> getAuthList() {
		return configs;
	}

	public List<AuthClientProperties> getConfigs() {
		return configs;
	}

	public void setConfigs(List<AuthClientProperties> configs) {
		this.configs = configs;
	}

}
